# coding=utf8

# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# NOTE: This class is auto generated by the jdcloud code generator program.

from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest


class DescribeMetricsForAlarmRequest(JDCloudRequest):
    """
    查询可用于创建监控规则的指标列表,metric介绍：<a href="https://docs.jdcloud.com/cn/monitoring/metrics">Metrics</a>
    """

    def __init__(self, parameters, header=None, version="v2"):
        super(DescribeMetricsForAlarmRequest, self).__init__(
            '/groupAlarms:metrics', 'GET', header, version)
        self.parameters = parameters


class DescribeMetricsForAlarmParameters(object):

    def __init__(self, ):
        """
        """

        self.serviceCode = None
        self.product = None
        self.dimension = None
        self.metricType = None

    def setServiceCode(self, serviceCode):
        """
        :param serviceCode: (Optional) 产品线
        """
        self.serviceCode = serviceCode

    def setProduct(self, product):
        """
        :param product: (Optional) 产品类型，如redis2.8cluster(集群)\redis2.8MS(主从)。当serviceCode与product同时指定时，product优先级更高
        """
        self.product = product

    def setDimension(self, dimension):
        """
        :param dimension: (Optional) 产品维度，必须指定serviceCode或product才生效。
        """
        self.dimension = dimension

    def setMetricType(self, metricType):
        """
        :param metricType: (Optional) metric类型，取值0、1；默认值：0（常规指标，用于控制台创建报警规则）、1（其它）
        """
        self.metricType = metricType

